package demo;

public class Demo5 {
    public static void main(String[] args) {
        Thread thread=new Thread(()->{
            while (true){
                try {
                    System.out.println("hello");
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        });
        thread.start();
    }
}
